<?php
/**
 * @author Demianchuk Dmitro
 * @email d.demianchuk@gmail.com
 * @date 30.01.12
 * @version 1.0
 * @package application
 */
class PasswordInput extends TextInput
{
	public function save($model){
		if(isset($_POST['_formNull'][$this->name][0]) && isset($_POST['_formNull'][$this->name][1]) &&
			$_POST['_formNull'][$this->name][0]==$_POST['_formNull'][$this->name][1]
		){
			parent::save($model);
		}
	}

	public function show(){
		return '
		<input type="password" value="" name="_form['.$this->name.'][]" />
		<input type="password" value="" name="_form['.$this->name.'][]" />';
	}

	public function isNull(){
		return false;
	}
}
